package com.briup.jd2511.jd2511_product_source.service;

import com.briup.jd2511.jd2511_product_source.exception.ServiceException;
import com.briup.jd2511.jd2511_product_source.pojo.ManagerHurdles;
import com.briup.jd2511.jd2511_product_source.pojo.ext.ManagerHurdlesExt;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface HurdlesService {

    /**
     * 查询栏圈的所有容量
     * @return java.util.List<Integer>
     * @throws ServiceException
     */
    List<Integer> queryAllMax() throws ServiceException;

    /**
     * 条件查询所有栏圈带分页，携带栏舍信息
     * @param hName 栏圈名称
     * @param hMax 栏圈容量
     * @param fhName 栏舍名称
     * @param hEnable 是否可用
     * @param pageNum 当前页码
     * @param pageSize 每页条数
     * @return com.github.pagehelper.PageInfo<ManagerHurdlesExt>
     * @throws ServiceException
     */
    PageInfo<ManagerHurdlesExt> getAllByConditionByPage(String hName, Integer hMax, String fhName, String hEnable, Integer pageNum, Integer pageSize) throws ServiceException;

    /**
     * 新增/修改栏圈数据
     * @param managerHurdles 栏圈数据
     * @throws ServiceException
     */
    void saveOrUpdate(ManagerHurdles managerHurdles) throws ServiceException;

    /**
     * 修改栏圈启用状态
     * @param hId 栏圈id
     * @param hEnable 启用状态
     * @throws ServiceException
     */
    void updateHEnable(String hId, String hEnable) throws ServiceException;

    /**
     * 批量禁用/启用栏圈状态
     * @param list 批量修改栏圈数据
     * @throws ServiceException
     */
    void updateHEnableBatch(List<Map<String,String>> list) throws ServiceException;

    /**
     * 查询所有可用的栏圈
     * @return java.util.List<ManagerHurdles>
     * @throws ServiceException
     */
    List<ManagerHurdles> queryAllEnable() throws ServiceException;
}
